package edu.eas.admin.mapper;

import edu.eas.common.pojo.UserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author cql
 */
public interface UserRoleMapper {

    /**
     * 批量新增 用户-角色 关联
     *
     * @param userRoles
     * @return
     */
    int batchInsert(@Param("userRoles") List<UserRole> userRoles);


    /**
     * 删除关联
     *
     * @param userId
     * @param userType
     */
    void deleteByUserId(@Param("userId") Long userId, @Param("userType") Integer userType);

    /**
     * 批量移除 关联
     *
     * @param adminIds
     * @param userType
     */
    void deleteUserRole(@Param("adminIds") Long[] adminIds, @Param("userType") Integer userType);
}
